const { Sequelize } = require('sequelize');
const {
    MYSQL_HOST,
    MYSQL_PORT,
    MYSQL_USER,
    MYSQL_PWD,
    MYSQL_DB
} = require('../config/config.defult')
const seq = new Sequelize(MYSQL_DB,MYSQL_USER,MYSQL_PWD,{
    host:MYSQL_HOST,
    dialect:'mysql'
})

//     seq.authenticate().then(()=>{
//         console.log('successfully.');
//     }).catch (error=> {
//     console.error('数据库连接失败', error);
//   })
  module.exports = seq